package com.zx.notification.common.dao;

import com.zx.notification.common.model.SystemNotifications;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface SystemNotificationsMapper {
    int deleteByPrimaryKey(@Param("id") String id);

    int insert(SystemNotifications row);

    int insertSelective(SystemNotifications row);

    SystemNotifications selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(SystemNotifications row);

    int updateByPrimaryKeyWithBLOBs(SystemNotifications row);

    int updateByPrimaryKey(SystemNotifications row);

    Long getSystemNotificationsListCount(@Param("userId") String userId,
                                         @Param("templateCode") String templateCode,
                                         @Param("title") String title,
                                         @Param("bizType") String bizType,
                                         @Param("createTimeStart") LocalDateTime createTimeStart,
                                         @Param("createTimeEnd") LocalDateTime createTimeEnd);

    List<SystemNotifications> getSystemNotificationsListByPage(@Param("userId") String userId,
                                                               @Param("templateCode") String templateCode,
                                                               @Param("title") String title,
                                                               @Param("bizType") String bizType,
                                                               @Param("createTimeStart") LocalDateTime createTimeStart,
                                                               @Param("createTimeEnd") LocalDateTime createTimeEnd,
                                                               @Param("pageNum") Long pageNum,
                                                               @Param("pageSize") Long pageSize);
}